import { SpecialBankService } from './service.service';
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
@Component({
  selector: 'app-service',
  templateUrl: './service.component.html',
  styleUrls: ['./service.component.scss'],
  providers: [SpecialBankService]
})
export class ServiceComponent implements OnInit {
  public operate = "edit";

  // 服务专户信息
  public SpecialBankInfo;

  public nFundNo :any;
  constructor(
    public router: Router,
    private route: ActivatedRoute,
    public specialBankService: SpecialBankService,
  ) {

  }

  ngOnInit() {
    let that = this;

    this.route.params.subscribe((data: any) => {

      that.nFundNo = data.nFundNo;
      this.operate = data.operate;
    });
    this.GetSpecialBankInfo();
  }

  // 查询服务类条目
  GetSpecialBankInfo(){
    let that = this;
    let parameter ={
      pageIndex:1,
      pageSize:10,
      nFundNo:that.nFundNo
    }
    this.specialBankService.GetSpecialBankInfo(that.nFundNo).subscribe(data => {
      if (data) {
        that.SpecialBankInfo = data.list;
        }
    })
  }
}
